*Relative Polarization*
*Main Tables*

set level 95
*Table 2*
*std lit on polarization*
logit turnout_2 indifference_2 e2012 turnout_1 [pweight=demographic_weight], r
outreg2 using table2_pooled.doc, replace alpha(0.001, 0.01, 0.05)

*change in indifference*

mlogit chgturnout change_indifference e2012 [pweight=demographic_weight], r
outreg2 using table1b_.doc, replace alpha(0.001, 0.01, 0.05)


*alienation*
logit turnout_2 mindist_2 e2012 turnout_1 [pweight=demographic_weight], r
outreg2 using table2_pooled.doc, append alpha(0.001, 0.01, 0.05)

*change in alienation*
mlogit chgturnout change_mindist e2012 [pweight=demographic_weight], r
outreg2 using table1c_.doc, replace alpha(0.001, 0.01, 0.05)



*Table 3*
logit turnout_2 c.mindist_2##c.indifference_2 e2012 turnout_1 [pweight=demographic_weight], r
outreg2 using table3_pooled.doc, replace alpha(0.001, 0.01, 0.05)


*we want to see if the naive interaction of alienation and indifference captures the effect of these variables when equidistance==0*

gen equidist=0
replace equidist=1 if distREM==distFN & distREM~=. & distFN~=.
replace equidist=1 if dist_SOC==dist_UMP & dist_SOC~=. & dist_UMP~=.
tab equidist
label var equidist "if soc=ump or rem=fn, 1 otherwise 0"


*This shows that the naive model does not work well when equidistance*

logit turnout_2 c.indifference_2##c.mindist_2 e2012 turnout_1 [pweight=demographic_weight] if equidist==1, r
outreg2 using table3_pooled.doc, append alpha(0.001, 0.01, 0.05)

*no equidistant voters*
logit turnout_2 c.indifference_2##c.mindist_2 e2012 turnout_1 [pweight=demographic_weight] if equidist==0, r
outreg2 using table3_pooled.doc, append alpha(0.001, 0.01, 0.05)


*Table 4*
*relative polarization variable*
logit turnout_2  polarization_2  e2012 [pweight=demographic_weight], r
outreg2 using table4pooled.doc, replace alpha(0.001, 0.01, 0.05)
logit turnout_2  polarization_2  e2012 turnout_1 [pweight=demographic_weight], r
outreg2 using table4pooled.doc, append alpha(0.001, 0.01, 0.05)


*predicted probab*
*Figure 6*
*Model 1*
logit turnout_2  polarization_2  e2012 [pweight=demographic_weight], r
margins, at(polarization_2=(0(1)10)) atmeans vsquish post
marginsplot, xtitle ("Relative Polarization") ytitle("Probability of Turnout in Round 2") title(" ")


